package cn.fl.ref.fncprjbscinfo.service.impl;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cmm.mid.core.framework.dto.DataResultDTO;
import cmm.mid.core.framework.page.Pager;
import cn.cmm.base.framework.constant.BaseExceptionConstant;
import cn.cmm.base.framework.exception.BaseException;
import cn.cmm.base.framework.utils.BaseLogUtils;
import cn.cmm.base.framework.utils.CollectionUtils;
import cn.cmm.base.framework.utils.StringUtils;
import cn.fl.framework.base.context.CurrentThreadContext;
import cn.fl.ref.asspackinfo.transform.AssPackInfoVOTransform;
import cn.fl.ref.asspackinfo.transform.FncPrjPayRltvInfoVOTransform;
import cn.fl.ref.asspackinfo.vo.AssPackInfoVO;
import cn.fl.ref.asspackinfo.vo.FncPrjPayRltvInfoVO;
import cn.fl.ref.fncprjbscinfo.service.IFncPrjBscInfoService;
import cn.fl.ref.fncprjbscinfo.service.IFncPrjSplitAccountService;
import cn.fl.ref.fncprjbscinfo.transform.FncPrjBscInfoVOTransform;
import cn.fl.ref.fncprjbscinfo.transform.FncPrjSplitAccountVOTransform;
import cn.fl.ref.fncprjbscinfo.vo.FncPrjBscInfoVO;
import cn.fl.ref.fncprjbscinfo.vo.FncPrjSplitAccountVO;
import cn.fl.ref.fncprjdrawmon.transform.FncPrjDrawMonVOTransform;
import cn.fl.ref.fncprjdrawmon.vo.FncPrjDrawMonVO;
import cn.fl.ref.fncprjfstpyinfo.transform.FncPrjDetailVOTransform;
import cn.fl.ref.fncprjfstpyinfo.transform.FncPrjFstpyInfoVOTransform;
import cn.fl.ref.fncprjfstpyinfo.vo.FncPrjFstpyInfoVO;
import fl.flow.facade.flow.dto.FlowStartParamsDTO;
import fl.ref.asspackinfo.service.IAssPackInfoApiService;
import fl.ref.fncprjbscinfo.condition.FncPrjBscInfoQueryCondition;
import fl.ref.fncprjbscinfo.condition.FncPrjSplitAccountQueryCondition;
import fl.ref.fncprjbscinfo.dto.FncPrjBscInfoDTO;
import fl.ref.fncprjbscinfo.service.IFncPrjBscInfoApiService;
import fl.ref.fncprjbscinfo.service.IFncPrjSplitAccountApiService;
import fl.ref.fncprjdrawmon.service.IFncPrjDrawMonApiService;
import fl.ref.fncprjfstpyinfo.condition.FncPrjFstpyInfoQueryCondition;
import fl.ref.fncprjfstpyinfo.constant.FncPrjFstpyInfoConstant;
import fl.ref.fncprjfstpyinfo.dto.FncPrjFstpyInfoDTO;
import fl.ref.fncprjfstpyinfo.service.IFncPrjFstpyInfoApiService;
/**
 * @Description: 再融资项目分账账户信息表
 * @Description:业务层方法名称前缀：新增：add* 删除：remove* 修改：modify* 查询对象：select* get* 批量：batch* 查询集合：search*
    * 服务实现层
 */
@Service
public class FncPrjSplitAccountServiceImpl implements IFncPrjSplitAccountService {

	private static final Logger logger = LoggerFactory.getLogger(IFncPrjBscInfoService.class);
	
	
	@Autowired
	private IFncPrjSplitAccountApiService  fncPrjSplitAccountApiService;

	
	
	@Override
	public Long add(FncPrjSplitAccountVO entity) throws BaseException {
		if(null == entity){
			throw new BaseException(BaseExceptionConstant.BASE_EXCEPTION_CODE_600,BaseExceptionConstant.BASE_EXCEPTION_CODE_600_NAME);
		};
		//系统日志-有用户的情况下
		BaseLogUtils.info(logger, "add", "新增FncPrjSplitAccountVO数据.", CurrentThreadContext.getCurrentUserName());
		//系统日志-无用户的情况下
		BaseLogUtils.info(logger, "add", "新增FncPrjSplitAccountVO数据.");
		return this.fncPrjSplitAccountApiService.add(FncPrjSplitAccountVOTransform.toDTO(entity));
	}

	
	@Override
	public boolean modify(FncPrjSplitAccountVO entity) throws BaseException {
		if(null == entity){
			throw new BaseException(BaseExceptionConstant.BASE_EXCEPTION_CODE_600,BaseExceptionConstant.BASE_EXCEPTION_CODE_600_NAME);
		};
		return this.fncPrjSplitAccountApiService.modify(FncPrjSplitAccountVOTransform.toDTO(entity));
	}

	

	@Override
	public List<FncPrjSplitAccountVO> searchList(FncPrjSplitAccountQueryCondition condition) {
		return FncPrjSplitAccountVOTransform.toVOList(this.fncPrjSplitAccountApiService.searchList(condition))  ;
	}


	@Override
	public FncPrjSplitAccountVO selectById(Long id) throws BaseException {
		return FncPrjSplitAccountVOTransform.toVO(fncPrjSplitAccountApiService.selectById(id));
	}	

	
	
	
}
